<template>
  <div class="wrap">
    <div class="container ">
      <div class="info">

        <div class="row-two">
          <el-button type="primary" icon="el-icon-edit" size="medium" style="width:100%" @click="write">写文章</el-button>
        </div>
      </div>
      <el-menu
        default-active="2"
        class="el-menu-vertical-demo"
        :router="true"
        @open="handleOpen"
        @close="handleClose"
      >
        <el-menu-item index="/news/creator/home">
          <i class="el-icon-s-home" />
          <span slot="title">首页</span>
        </el-menu-item>
        <el-submenu index="2">
          <template slot="title">
            <i class="el-icon-s-marketing" />
            <span>管理</span>
          </template>
          <el-menu-item index="/news/creator/article">文章管理</el-menu-item>
          <!-- <el-menu-item index="/news/creator/comment">评论管理</el-menu-item> -->
        </el-submenu>
        <el-submenu index="3">
          <template slot="title">
            <i class="el-icon-s-data" />
            <span>数据</span>
          </template>
          <el-menu-item index="/news/creator/information">文章数据</el-menu-item>
          <el-menu-item index="3-2">粉丝数据</el-menu-item>
        </el-submenu>
        <el-submenu index="4">
          <template slot="title">
            <i class="el-icon-question" />
            <span>帮助</span>
          </template>
          <el-menu-item index="/news/creator/help/question">常见问题</el-menu-item>
        </el-submenu>
        <el-submenu index="5">
          <template slot="title">
            <i class="el-icon-s-tools" />
            <span>设置</span>
          </template>
          <el-menu-item index="5-1">创作设置</el-menu-item>
        </el-submenu>
      </el-menu>
    </div>
  </div>
</template>

<script>
export default {
  name: 'LeftSidebar',
  components: {},
  data() {
    return {
      circleUrl: 'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png'
    }
  },
  created() {},
  methods: {

    write() {
      this.$router.push({ path: '/news/creator/published' })
    },
    handleOpen(key, keyPath) {
      console.log(key, keyPath)
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath)
    }
  }
}
</script>
<style lang="scss" scoped>
.container{
  // width: 100%;
  // height: 100vh;
  background: #fff;
    height: calc(100vh - 80px);
}
.info{
  padding: 30px 15px 15px 15px;
  .row-one{
    display: flex;
    align-items: center;
    a:last-child{margin-left:10px;font-weight:500}
    margin-bottom: 30px;
  }
}
.el-menu {
    border-right: none;

}
</style>
